import { Component, OnInit } from '@angular/core';
import { NzMessageService } from 'ng-zorro-antd';
import { _HttpClient } from '@delon/theme';

@Component({
    selector: 'test-basic-list',
    templateUrl: './test-basic-list.component.html'
})

export class TestBasicListComponent implements OnInit {
    pageQuery: any = {
        pageIndex: 1,
        pageSize: 10,
        status: 'all'
    };

    data: any[] = [];
    loading = false; 

    constructor(private http : _HttpClient, public msg : NzMessageService) {
    }

    ngOnInit() {
    }

    getData() {
        this.loading = true;
        this.http.get("/api/list", { count: 10 }).subscribe((res: any) => {
            this.data = res;
            this.loading = false;
        });
    }
}